package com.wj.strategy.context;

import com.wj.strategy.IStrategy;

/**
 * @author WangJin
 * @version 1.0
 * @date 2022/2/11 9:42
 */
    //定义一个袋子 装妙计
public class Context {

    private IStrategy strategy;
    //袋子装妙计
    public Context(IStrategy strategy){
        this.strategy = strategy;
    }

    //使用妙计方法
    public void operate(){
        this.strategy.operate();
    }
}
